<?php 
	//方式一
	$group = array(
				array("name"=>"zs", "sex"=>"男", "age"=>18, "email"=>"aa@ss.com"),
				array("name"=>"ls", "sex"=>"男", "age"=>19, "email"=>"bb@ss.com"),
				array("name"=>"ww", "sex"=>"女", "age"=>20, "email"=>"cc@ss.com"),
				array("name"=>"xm", "sex"=>"男", "age"=>18, "email"=>"dd@ss.com")
			);

	echo '<table border="1px" align="center">';
	echo '<tr align="center">
			<td>姓名</td>
			<td>性别</td>
			<td>年龄</td>
			<td>邮箱</td>
		 </tr>';

		foreach($group as $k1) {
			echo '<tr align="center">';
				foreach ($k1 as $k2 => $value) {
					echo '<td>'.$value.'</td>';
				}
			echo '</tr>';
		}

	echo '<table>';
	echo "<hr>";

	//方式二
	$group1 = array(
				"Hello World!",
				array("name"=>"zs", "sex"=>"男", "age"=>18, "email"=>"aa@ss.com"),
				array("name"=>"ls", "sex"=>"男", "age"=>19, "email"=>"bb@ss.com"),
				array("name"=>"ww", "sex"=>"女", "age"=>20, "email"=>"cc@ss.com"),
				array("name"=>"xm", "sex"=>"男", "age"=>18, "email"=>"dd@ss.com")
			);

	echo '<table border="1px" align="center">';
	/*echo '<tr align="center">
			<td>姓名</td>
			<td>性别</td>
			<td>年龄</td>
			<td>邮箱</td>
		 </tr>';*/

		while(list($key, $val) = each($group1)){
			echo "<tr>";

			if(is_array($val)){
				while(list( , $col) = each($val)){
					echo '<td>'.$col.'</td>';
				}
			}else{
				echo '<td colspan="4">'.$key.':'.$val.'</td>';
			}

			echo "</tr>";
		}

	echo '<table>';


 ?>